package com.pubinfo.passbook.data.quartz.task;

import com.pubinfo.passbook.data.quartz.service.InvoiceServer;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Slf4j
@DisallowConcurrentExecution //作业不并发
@Component
public class SyncInvoiceJob implements Job {
  @Resource
  InvoiceServer server;
  
  @Override
  public void execute(JobExecutionContext context) {
    server.receiveInvoiceList();
  }
}